<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>$view[title] {$catedb[$cid][cname]} $very[title]</title>
<meta name="keywords" content="$metakeyword" />
<meta name="description" content="$metadescrip" />
<base href="$very[url]/" />
<!--#if(function_exists('readover')){
$headerstyle=readover(R_P.'css/layout.css');
$headerstyle.=readover(R_P.'css/style.css');
}else{
$headerstyle='<link href="css/layout.css" rel="stylesheet" type="text/css" /><link href="css/style.css" rel="stylesheet" type="text/css" />';
}#-->
<!--css-->
<style type="text/css">
$headerstyle
</style>
<!--css-->
<!--#if($cid){#-->
<link rel="alternate" type="application/rss+xml" title="RSS" href="$very[url]/rss.php?cid=$cid" />
<!--#}#-->
</head>
<body>
<!--#if(!$very[brower]){#-->
<script language="javascript" src="script/unitpngfix.js"></script>
<!--#}#-->
<script language="javascript">
var login_name = "$login_name";
function searchType(type)
{
	if (type == '1')
	{
		document.getElementById("search_cid").style.display="inline"
		document.getElementById("search_rid").style.display="none"
	}
	else if (type == '2')
	{
		document.getElementById("search_cid").style.display="none"
		document.getElementById("search_rid").style.display="inline"
	}
	else
	{
		document.getElementById("search_cid").style.display="none"
		document.getElementById("search_rid").style.display="none"		
	}
}
</script>
<div class="header">
  <div class="header-wrap1">
    <div id="logo"></div>
    <div id="topguide">
      <ul>
        $navhead
      </ul>
    </div>
    <div id="userpanel">
      <!--# if($login) { #-->
<ul>
<li> 欢迎您， $login_name !</li>
<li><img src="images/user.png" hspace="5" align="absmiddle" /><a href="my.php">个人资料</a></li>
<li><img src="images/up.png" hspace="5" align="absmiddle" /><a href="upload.php" onclick="return upload();">上传{$very[contentName]}</a></li>
<li><img src="images/drive.png" hspace="5" align="absmiddle" /><a href="my.php?action=upload">我的上传</a></li>
<li><img src="images/heart.png" hspace="5" align="absmiddle" /><a href="my.php?action=fav">我的收藏</a></li>
<li style="padding-left:15px;">[<a href="login.php?action=out">退出登录</a>]</li>
<!--# if($login[ifadmin]){#-->
<li style="padding-left:15px;">[<a href="admin.php">管理后台</a>]</li>
<!--#}#-->
</ul>
      <!--# } else {#-->
<script type="text/javascript" src="script/prototype.js"></script>
<script language="javascript">
function login()
{
	var loginname = document.getElementById("loginname").value;
	if (loginname.length <= 1) {
		alert('请输入用户名');
		return false;
	}
	var loginpwd = document.getElementById("loginpwd").value;
	if (loginpwd.length <= 1) {
		alert('请输入密码');
		return false;
	}
	var logincknum = document.getElementById("logincknum").value;
	if (logincknum.length <= 1) {
		alert('请输入验证码');
		return false;
	}
	var myAjax = new Ajax.Request("login.php",{method: 'POST',parameters: "loginname=" + loginname + "&loginpwd=" + loginpwd + "&cktime=" + cktime + "&ck=" + logincknum,onComplete: loginOK});
}
function loginOK(res)
{
	if(res.responseText == 'OK')
	{
		document.getElementById("userpanel").innerHTML = '登录成功';
		window.location.reload();
	}
	else
	{
		var msg = res.responseText;
		if(msg == 'ckerror')
		{
			alert('验证码错误');
		}
		else if(msg == 'nock')
		{
			alert('没有输入验证码');
		}
		else
		{
			alert(res.responseText);
		}
		showck();
	}
}

function loginOut()
{
	var url = 'login.php?action=out';
	var myAjax = new Ajax.Request(url,{onComplete: loginOutOK});
}

function loginOutOK(ret)
{
	window.location = 'index.php';
}

function showck(){
	var rand = new Date().valueOf();
	document.getElementById('ckimg').src = 'ck.php?size=100,30,12&' + rand;
}
</script>
      用户名：
      <input name="loginname" type="text" id="loginname" value="" size="10" />
      密码：
      <input name="loginpwd" type="password" id="loginpwd" value="" size="10" />
	  验证码：
	  <input name="logincknum" type="text" id="logincknum" value="" size="5" />
	  <img src="ck.php?size=90,30,12" align="absmiddle" id="ckimg" style="cursor:pointer;" onclick="showck();" />
	  <select name="cktime">
	    <option>登录时效</option>
	    <option value="0">浏览器进程</option>
	    <option value="3600">保存一小时</option>
	    <option value="86400">保存一天</option>
	    <option value="604800">保存一周</option>
	    <option value="2592000">保存一月</option>
	    <option value="9999999">永久有效</option>
	  </select>
      <input type="submit" class="submit" value="登录" onclick="login();" />
      <!--# }#-->
    </div>
    <!-- 子菜单 -->
  </div>
  <div class="clear"></div>
  <div id="menu">
    <ul>
<!--#if(!$cid){$homeclass="here";}else{$class='';}$cidCount = 0;#-->
<li><a id="menu_home" href="index.php" class="$homeclass">首页</a></li>
<cms type="cate" action="menu" />
<loop>
<!--#$cidCount++; if($cidCount >= 10) break;
if($val[cid]==$cid){$class="here";}else{$class='';}#-->
<li><a href="list.php?cid=$val[cid]" class="$class">$val[cname]</a></li>
</loop>
      <li id="more">
<!--# if($cidCount >= 10) {#-->
<a href="#">更多</a>
<!--#}#-->
	   </li>
    </ul>
  </div>
  <div id="topnav">
    <div class="search" style="margin-right:3px;">
<!--#
if($type_checked)
{
$check1 = '';
$check2 = 'CHECKED';
$show1 = 'display:none;';
$show2 = 'display:inline;';
}
else
{
$check2 = '';
$check1 = 'CHECKED';
$show2 = 'display:none;';
$show1 = 'display:inline;';
}
#-->
      <form method="post" action="search.php" style="margin:0">
	  <select name="method" onchange="searchType(this.value);">
	  <option value="1">{$very[contentName]}</option>
	  <option value="2">文件</option>
	  <option value="3">上传者</option>
	  </select>
		<select name="cid" id="search_cid" style="$show1">
		<option value="">所有目录</option>
		$cate_select
		</select>
        <select name="type" id="search_rid" style="$show2">
          <option value="">全部文件</option>
          <!--# foreach($restype as $rid=>$res){#-->
          <option value="$rid">$res[typename]</option>
          <!--#}#-->
        </select>
        <input name="keyword" type="text" class="searchinput" id="keyword" value="$keyword"/>
        <input name="s_type" type="hidden" id="s_type" value="simple" />
        <input name="step" type="hidden" id="step" value="2" />
        <input class="submit" type="submit" value="搜索" name="subjectsearch"/>
      </form>
    </div>
    <p>					<!--#if($cid){#-->
					<cms type="cate" action="menu" cid="$cid" />
					<loop>
						<span style="padding-left:15px;"><a href="{$val[url]}">{$val[cname]}</a>  </span>
						 </loop>
					<!--#}#--></p>
  </div>
</div>
<div style="height:8px;"></div>
